package com.googlecode.jasmincc.framework.configuration;

import java.util.ArrayList;

public class AbstractConfigReader {

	protected String buffer = null;

	protected Config config = null;

	protected ArrayList<Config> configs = new ArrayList<Config>();

	protected boolean optionsRegion = false;

	public String getClassByExt(String ext) {
		for (Config config : configs) {
			if (config.isMatchingExtension(ext)) {
				return config.getType();
			}
		}
		return "";
	}

	public String getClassName(String name) {
		for (Config c : configs) {
			if (c.getName().equalsIgnoreCase(name)) {
				return c.getType();
			}
		}

		return null;
	}
}
